package cn.com.cifi.mars.web.action.sys;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.com.cifi.mars.bean.vo.sys.rsp.IdmUserVo;
import cn.com.cifi.mars.bean.vo.sys.rsp.UserDataPermissionVo;
import cn.com.cifi.mars.bean.vo.sys.rsp.UserFunctionalPermissionVo;
import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import cn.com.cifi.mars.entity.common.IdmUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(tags = {"系统管理"})
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/sys/user")
public interface IUserController {
	 
	 @ApiOperation(value = "组织机构下的用户信息分页", notes = "组织机构下的用户信息分页")
	 @GetMapping(value = "userPageList")
	 public R<IdmUserVo> getUserPageList(
	            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
	            @ApiParam(value = "当前第几页", required = true, defaultValue = "1") @RequestParam(value = "current") String current,
	            @ApiParam(value = "每页条数", required = true, defaultValue = "2") @RequestParam(value = "pageSize") String pageSize,
	            @ApiParam(value = "部门id" , required = false) @RequestParam(name = "departmentnumber", defaultValue = "") String departmentnumber,
	            @ApiParam(value = "用户名称" , required = false) @RequestParam(name = "usercn", defaultValue = "") String usercn);
	 
	 @ApiOperation(value = "获取用户的数据权限", notes = "获取用户的数据权限")
	 @GetMapping(value = "dataPermissions")
	 public R<UserDataPermissionVo> getUserDataPermissions(
	            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
	            @ApiParam(value = "用户id" , required = true) @RequestParam(name = "userId", defaultValue = "") String userId);
	 
	 @ApiOperation(value = "获取用户的功能权限", notes = "获取用户的功能权限")
	 @GetMapping(value = "functionalPermissions")
	 public R<UserFunctionalPermissionVo> getUserFunctionalPermissions(
	            @ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
	            @ApiParam(value = "用户id" , required = true) @RequestParam(name = "userId", defaultValue = "") String userId);

	@ApiOperation(value = "获取岗位组对应的用户信息", notes = "获取岗位组对应的用户信息")
	@GetMapping(value = "positionGroupUserList")
	public R<IdmUser> getPositionGroupUserList(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "岗位组Id" , required = true) @RequestParam(name = "positionGroupId", defaultValue = "") String positionGroupId,
			@ApiParam(value = "组织id" , required = true) @RequestParam(name = "orgdepid", defaultValue = "") String orgdepid);

	 
}
